package com.chaoyong.higo.fragment;

import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.chaoyong.higo.R;
import com.chaoyong.higo.adapter.ShopAdapter;
import com.chaoyong.higo.base.BaseFragment;
import com.chaoyong.higo.view.TitleView;

/**
 *
 * @author 丁晶
 * 貌似不用了。。。
 */
public class FragShoppingBar extends BaseFragment {
	private TitleView titleView;
	private RecyclerView recyclerView;
	private ShopAdapter adapter;
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		mView = inflater.inflate(R.layout.frag_shopping_bar,container, false);
		return mView;
	}

	@Override
	public void findView() {
		titleView=(TitleView) mView.findViewById(R.id.fragshop_titleView);
		recyclerView=(RecyclerView) mView.findViewById(R.id.fragshop_RecyclerView);
	}

	@Override
	public void init() {
		titleView.setTitleText("购物车", mContext.getResources().getColor(R.color.white));
		titleView.setTitleBack(mContext.getResources().getColor(R.color.red_title));
		adapter=new ShopAdapter(mContext);
		recyclerView.setAdapter(adapter);
		recyclerView.setLayoutManager(new LinearLayoutManager(mContext));
	}
}
